package com.woniuxy.gateway;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.gateway.filter.factory.StripPrefixGatewayFilterFactory;
import org.springframework.cloud.gateway.handler.predicate.PathRoutePredicateFactory;

@SpringBootApplication
public class GatewayApplication {

    //这个是断言器 对应的是 Path 配置 （gateway会自动加载pathRoutePredicateFactory 到IOC容器中）
    //具体的拦截业务逻辑在 pathRoutePredicateFactory 这里进行
    PathRoutePredicateFactory pathRoutePredicateFactory;

    //这个是一个 filter 对应是 StripPrefix 配置 （gateway会自动加载stripPrefixGatewayFilterFactory 到IOC容器中）
    //具体的业务逻辑处理 stripPrefixGatewayFilterFactory 这里进行
    StripPrefixGatewayFilterFactory stripPrefixGatewayFilterFactory;

    public static void main(String[] args) {
        SpringApplication.run(GatewayApplication.class);
    }
}